/**
 * @description 全局变量
 * @property mode: 环境 dev:开发环境 prod：生产环境 
 * @property sysInfo: 系统信息
 * @property token：请求token
 * @property hasLoading： 用于存储当前http请求是否有调用loading效果
 */
export default class Global {
  constructor(mode) {
    this.mode = mode;
    this.sysInfo = wx.getSystemInfoSync();
    this.token = '';
    this.hasLoading = false;
  }
  set mode(value) {
    this._mode = value;
  }
  get mode() {
    return this._mode;
  }

  set sysInfo(value) {
    this._sysInfo = value;
  }
  get sysInfo() {
    return this._sysInfo;
  }

  set token(value) {
    this._token = value;
  }
  get token() {
    return this._token
  }

  set hasLoading(value) {
    this._hasLoading = value;
  }
  get hasLoading() {
    return this._hasLoading;
  }
}